package net.display;

import javax.servlet.http.HttpServletRequest;

import net.ko.controller.KObjectController;
import net.ko.displays.KObjectDisplay;

public class DisplayRegister extends KObjectDisplay {

	@Override
	public KObjectController getKobjectController(KObjectController koc, HttpServletRequest request) {
		super.getKobjectController(koc, request);
		koc.setValidatorClassName("net.controller.KValidateRegister");
		koc.getFieldController("mail").setValidateMethodName("validateEmail");
		koc.getFieldController("confirmation").setValidateMethodName("validateConfirmation");
		koc.getFieldController("password").setValidateMethodName("validatePassword");
		koc.getFieldController("login").setValidateMethodName("validateLogin");

		koc.getFieldController("login").setOptions("style='width:47%;'");
		koc.getFieldController("mail").setOptions("style='width:100%;'");
		koc.getFieldController("nom").setOptions("style='width:100%;'");
		koc.getFieldController("confirmation").setOptions("style='float:right;width:95%'");
		koc.getFieldController("password").setOptions("style='float:left;width:95%'");

		return koc;
	}

}
